Skip to content

Conversation

@dhonti-axpe
Copy link
Contributor

@dhonti-axpe dhonti-axpe commented Jan 4, 2026

🎟️ Jira ticket

ANDROID-16934

🥅 What's the goal?

  • Global task: Remove Databinding from Mistica in library module and the corresponding components.

This PR is a part of this three:

After all these PRs are merged, a final one will be created to remove the Data Binding feature from the build.gradle file.

🚧 How do we do it?

Remove BindingMethods, InverseBindingMethod and BindingAdapters methods and update corresponding README files from next components:
* LoaderrorFeedbackView
* HeaderView
* HightlightedCardView
* CheckBoxInput
* Input
* TextInput

☑️ Checks

  • I updated the documentation, including readmes and wikis. If this is a breaking change, tag the PR with "Breaking Change" label and remember to include breaking change migration guide in release notes where this version is released.
  • Tested with dark mode.
  • Tested with API 24.
  • Only affects Android side.
  • Accessibility considerations.

🧪 How can I test this?

As is mentioned in the corresponding ANDROID-16934 ticket, is tested in the "android-messenger" client project that the total PR changes exposed in #476 works correctly.

…"LoadErrorFeedabackView" component and update corresponding README file.
… "HeaderView" component and update corresponding README file
… "HighlightedCardView" component and update its corresponding README file.
… "Input", "TextInput" and expose some attributes also from "CheckBoxInput" components, updating their corresponding README files
@dhonti-axpe dhonti-axpe changed the title Android 16934/pr2 remove databinding ANDROID-16934 -- (II) Remove databinding related code Jan 4, 2026
@github-actions
Copy link

github-actions bot commented Jan 4, 2026

[Firebase] 📱 New catalog for testing generated:
Download from Firebase
Download from App Tester

@github-actions
Copy link

github-actions bot commented Jan 4, 2026

[Firebase] 📱 New catalog for testing generated:
Download from Firebase
Download from App Tester

@dhonti-axpe dhonti-axpe requested review from a team, bravoborja and haynlo and removed request for a team January 13, 2026 12:26
@dhonti-axpe dhonti-axpe marked this pull request as ready for review January 13, 2026 12:26
@haynlo haynlo requested a review from Copilot January 13, 2026 13:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes Android Data Binding infrastructure from six components in the library module: LoadErrorFeedbackView, HeaderView, HighlightedCardView, CheckBoxInput, Input, and TextInput. The changes eliminate BindingMethods, InverseBindingMethods, and BindingAdapter annotations while updating documentation to reflect that these components no longer support data binding.

Changes:

  • Removed data binding annotations and adapter methods from input components (TextInput, Input, CheckBoxInput) and view components (LoadErrorFeedbackView, HeaderView, HighlightedCardView)
  • Added wrapper methods in CheckBoxInput and HeaderView to maintain backward compatibility with existing attribute names
  • Updated README files to clarify that components support attribute-based configuration only, not data binding

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
library/src/main/java/com/telefonica/mistica/input/TextInput.kt Removed data binding imports, annotations, and text watcher adapter method
library/src/main/java/com/telefonica/mistica/input/README.md Updated documentation to remove data binding references and added note about standard View implementation
library/src/main/java/com/telefonica/mistica/input/Input.kt Removed data binding imports and BindingMethods annotation for base Input class
library/src/main/java/com/telefonica/mistica/input/CheckBoxInput.kt Removed data binding annotations and check watcher adapter; added wrapper methods for attribute compatibility
library/src/main/java/com/telefonica/mistica/highlightedcard/README.md Updated documentation to remove data binding reference
library/src/main/java/com/telefonica/mistica/highlightedcard/HighlightedCardView.kt Removed data binding imports and BindingMethods annotation; reordered import statements
library/src/main/java/com/telefonica/mistica/header/README.md Updated documentation to remove data binding reference
library/src/main/java/com/telefonica/mistica/header/HeaderView.kt Removed data binding annotations and added wrapper methods with "header" prefix for attribute compatibility
library/src/main/java/com/telefonica/mistica/feedback/screen/README.md Updated documentation to remove data binding reference
library/src/main/java/com/telefonica/mistica/feedback/error/README.md Updated documentation to remove data binding reference
library/src/main/java/com/telefonica/mistica/feedback/error/LoadErrorFeedbackView.kt Removed data binding annotations and unused import

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


init {
LayoutInflater.from(context).inflate(R.layout.load_error_feedback, this, true)
LayoutInflater.from(context).inflate(R.layout.load_error_feedback, this, true)
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate layout inflation on line 27. The same layout is being inflated twice, which will create duplicate views in the hierarchy and cause incorrect UI rendering.

Suggested change
LayoutInflater.from(context).inflate(R.layout.load_error_feedback, this, true)

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied change here: 85a6de1

Comment on lines +238 to +244
fun setHeaderFirstPretitle(@StringRes textRes: Int?) = setFirstPretitle(textRes)
fun setHeaderTitle(text: CharSequence?) = setTitle(text)

fun setHeaderInverse(value: Boolean) = setInverse(value)
fun setHeaderHasTopPadding(value: Boolean) = setHasTopPadding(value)

fun setHeaderFirstPretitle(text: CharSequence?) = setFirstPretitle(text)
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate method definition for setHeaderFirstPretitle. Line 238 accepts @stringres Int? while line 244 accepts CharSequence?. This creates a naming collision that will cause compilation errors.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently these methods do not launch any compilation errors due to signature is different.

fun setHeaderSubtitleHasSecondaryColor(value: Boolean) = setSubtitleHasSecondaryColor(value)

fun setHeaderActionButtonText(text: CharSequence?) = setActionButtonText(text)
fun setHeaderSecondaryActionButtonText(text: CharSequence?) = setSecondaryActionButtonText(text)
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line exceeds 120 characters. Consider breaking this line for better readability.

Suggested change
fun setHeaderSecondaryActionButtonText(text: CharSequence?) = setSecondaryActionButtonText(text)
fun setHeaderSecondaryActionButtonText(text: CharSequence?) =
setSecondaryActionButtonText(text)

Copilot uses AI. Check for mistakes.
* Drop Down Input --> `com.telefonica.mistica.input.DropDownInput`

All them can be placed directly on any layout, and can be configured with the following attributes (**All atributes for all types support databinding**):
All them can be placed directly on any layout, and can be configured with the following attributes (**All attributes are supported for all types**):
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected grammar from 'All them' to 'All of them'.

Suggested change
All them can be placed directly on any layout, and can be configured with the following attributes (**All attributes are supported for all types**):
All of them can be placed directly on any layout, and can be configured with the following attributes (**All attributes are supported for all types**):

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied change here: 1014011

Comment on lines +81 to +89
fun setInputError(@StringRes errorRes: Int?) {
if (errorRes == null) {
error = null
setErrorEnabled(false)
} else {
error = context.getString(errorRes)
setErrorEnabled(true)
}
}
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a potential breaking change. The new public method setInputError(@stringres Int?) was introduced as a replacement for the removed data binding attribute 'inputError'. While this maintains functional compatibility through attribute-based configuration, consumers who were directly calling methods on CheckBoxInput instances may need to update their code if they were using the data binding setError method signature that accepted CharSequence. Please apply the 'Breaking change' label to this PR. Migration notes should be added when drafting the release.

Copilot generated this review using guidance from repository custom instructions.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After merging all this feature branch in Mistica, is necessary to fit current implementation in "android-messenger" incresing new Mistica version.

Comment on lines +95 to +101
fun setInputCheckText(text: CharSequence?) {
setText(text)
}

fun getInputCheckText(): CharSequence? {
return getText()
}
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are potential breaking changes. The new public methods setInputCheckText and getInputCheckText replace the removed data binding methods setText and getText. While these maintain functional compatibility through attribute-based configuration, the change in method naming may affect consumers who were calling these methods directly. Please apply the 'Breaking change' label to this PR. Migration notes should be added when drafting the release.

Copilot generated this review using guidance from repository custom instructions.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same like previous one

@github-actions
Copy link

[Firebase] 📱 New catalog for testing generated:
Download from Firebase
Download from App Tester

Copy link
Contributor

@haynlo haynlo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@dhonti-axpe dhonti-axpe merged commit 25e476d into ANDROID-16934/base-remove-databinding Jan 14, 2026
4 checks passed
@dhonti-axpe dhonti-axpe deleted the ANDROID-16934/pr2-remove-databinding branch January 14, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants